<template>

  <div>
    <div class="common-form">竞猜时间</div>
    <el-form-item label="开始时间" prop="start_time"
      :rules="[{ required: true, message: '请选择开始时间', trigger: 'change' }]">
      <el-date-picker
        v-model="form.start_time"
        type="datetime"
        placeholder="开始时间"
        format="yyyy-MM-dd HH:mm"
        value-format="yyyy-MM-dd HH:mm"></el-date-picker>
    </el-form-item>

    <el-form-item label="结束时间" prop="end_time"
      :rules="[{ required: true, message: '请选择结束时间', trigger: 'change' }]">
      <el-date-picker
        v-model="form.end_time"
        type="datetime"
        placeholder="开始时间"
        format="yyyy-MM-dd HH:mm"
        value-format="yyyy-MM-dd HH:mm"></el-date-picker>
    </el-form-item>
  
  </div>
</template>

<script>
export default {
  data(){
    return{
      /*时间*/
      timeVal: new Date(2016, 9, 10, 8, 0, 0),
      /*如果没有后面的-8.64e7就是不可以选择今天的*/
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7;
        }
      }
    }
  },
  props: {
    form: Object
  }
};
</script>

<style></style>
